package com.pclong.sql;

import java.util.List;

import com.pclong.sql.DataSourceProvider;
import com.pclong.util.debug.Debug;

//import com.pclong.sql.AdminDao;
//import com.leenlegend.leen.domain.Admin;
//import com.leenlegend.leen.global.DomainArray;
//import com.leenlegend.leen.global.TableName;

public class AdminDao extends BaseDao {
	
	private String tableName;
	private String[] colNames;
	private String[] colNames_noid;
	private Debug debug;
	
//	public AdminDao() {
//		super();
//		tableName = TableName.ADMINS;
//		colNames = DomainArray.ADMINS;
//		colNames_noid = DomainArray.ADMINS_NOID;
//		debug = DataSourceProvider.getDebug(AdminDao.class);
//	}
//	
//	public Integer addAdmin(Admin admin) {
//		return helper.insertRecord(tableName, colNames_noid, admin);
//	}
//
//	public Integer addAdmin(String[] insertedColumnNames, Object... values) {
//		return helper.insertRecord(tableName, insertedColumnNames, values);
//	}
//
//	public Admin getAdminById(Integer id) {
//		return helper.selectRecord(tableName, id, colNames, Admin.class);
//	}
//
//	public List<Admin> getAdminByRealname(String realname) {
//		String where = "where `realname` = ?";
//		return helper.selectRecords(tableName, colNames, where, Admin.class, realname);
//	}
//
//	public Admin getAdminByUsername(String username) {
//		String where = "where `username` = ?";
//		return helper.selectRecord(tableName, colNames, where, Admin.class, username);
//	}
//
//	public List<Admin> getAdminsByLevel(Integer level) {
//		String where = "where `level` = ?";
//		return helper.selectRecords(tableName, colNames, where, Admin.class, level);
//	}
//
//	public List<Admin> getAdminsByRealnameLike(String realname) {
//		String where = "where `realname` like '%" + realname + "%'";
//		return helper.selectRecords(tableName, colNames, where, Admin.class);
//	}
//
//	public List<Admin> getAdminsByUsernameLike(String username) {
//		String where = "where `username` like '%" + username + "%'";
//		return helper.selectRecords(tableName, colNames, where, Admin.class);
//	}
//
//	public int updateAdmin(Admin admin) {
//		return helper.updateRecord(tableName, colNames_noid, admin);
//	}
//
//	public int updateAdmin(Admin admin, String[] updatedColumnNames,
//			Object... values) {
//		return helper.updateRecord(tableName, admin.getId(), updatedColumnNames, values);
//	}
//
//	public int updateAdmin(Admin admin, String updatedColumnName, Object value) {
//		return helper.updateRecord(tableName, admin.getId(), updatedColumnName, value);
//	}
	
}
